home *** CD-ROM | disk | FTP | other *** search
/ Champak 119 / (Vol 119) Nov 09 2010.iso / TGKI-109 / Games / fratboy_girlfriend_tower_defense.swf / scripts / DefineButton2_2054 / BUTTONCONDACTION on(release).as
Text File  |  2010-11-09  |  648b  |  30 lines

  1. on(release){
  2.    if(_root.pausee != true)
  3.    {
  4.       _root.cursor.swapDepths(99999);
  5.       _root.cursor.removeMovieClip();
  6.       i = 0;
  7.       while(i <= _root.creatureNum)
  8.       {
  9.          eval("_global.a" + i).mc.removeMovieClip();
  10.          delete ("_global.a" + i);
  11.          i++;
  12.       }
  13.       i = 0;
  14.       while(i <= _root.towersNum)
  15.       {
  16.          eval("_root.tower" + i).removeMovieClip();
  17.          i++;
  18.       }
  19.       i = 0;
  20.       while(i <= _root.missilesNum)
  21.       {
  22.          eval("_root.missiles" + i).removeMovieClip();
  23.          i++;
  24.       }
  25.       clearAll();
  26.       gotoAndStop("begin");
  27.       play();
  28.    }
  29. }
  30.